<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>假果酱欢迎你</title>
    <link rel="stylesheet" href="/tencent/weui/css/weui.min.css">
    <link rel="stylesheet" href="/tencent/weui/css/jquery-weui.min.css">
    <link href="/tencent/css/bootstrap.min.css" rel="stylesheet">
    <link href="/tencent/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="/tencent/css/animate.css" rel="stylesheet">
    <link href="/tencent/css/style.css" rel="stylesheet">
    <script src="/tencent/js/md5.js"></script>
</head>
<body class="gray-bg">
<input hidden id="selfProperty"value="ab12">
    <div class="loginColumns animated fadeInDown">
        <div class="row">
            <div class="col-md-6">
                <h2 class="font-bold">欢迎登陆楠尼玛AI小程序后台</h2>

                <p>

                </p>

                <p>
                    This backstage we only let ourselves use it
                </p>

                <p>
                    If you have any questions or dislikes, what can you do to me?Hit me？
                </p>

                <p>
                    <small>该后台为私人所有,有什么疑问欢迎在小程序留言</small>
                    <small><br>(ps:功能也还没做呢啊哈哈哈哈)</small>
                </p>

            </div>
            <div class="col-md-6">
                <div class="ibox-content">
                        <div class="form-group">
                            <input type="text" class="form-control" placeholder="请输入账号" required="" id="username">
                        </div>
                        <div class="form-group">
                            <input type="password" class="form-control" placeholder="请输入密码" required="" id="password">
                        </div>
                        <button  onclick="login()" class="btn btn-primary block full-width m-b">登陆</button>

                        <a href="#" onclick="$.alert('忘记了,你怎么不把自己忘了！？');">
                            <small>忘记密码?</small>
                        </a>

                        <p class="text-muted text-center">
                            <small>还没有账号？那对不起你进不来了。</small>
                        </p>
                    <p class="m-t">
                        <small>温馨提示: 该页面会清除已登陆的所有信息。</small>
                    </p>
                </div>
            </div>
        </div>
        <hr/>
        <div class="row">
            <div class="col-md-6">
                Copyright @假果酱
            </div>
            <div class="col-md-6 text-right">
               <small>© 2018 - no money pay for aliyun</small>
            </div>
        </div>
    </div>

</body>
<!-- body 最后 -->
<script src="/tencent/weui/js/jquery.min.js"></script>
<script src="/tencent/weui/js/jquery-weui.min.js"></script>
<script>
    function login() {
        var username = document.getElementById("username").value;
        var password = document.getElementById("password").value;
        if(username.length<=0){   //判空校验
            $.toptip('你是看不见你没输入账号吗?', 2000, 'error');  //设置显示时间
            return;
        }
        else if(password.length<=0){
            $.toptip('哇！！密码还没输入就想登陆,这么天真？', 2000, 'error');  //设置显示时间
            return;
        }
        var selfProperty = document.getElementById("selfProperty").value;
        var hexPassword = hex_md5(password+selfProperty);
        $.post("/tencent/fireIndex/adminLogin",{username:username,password:hexPassword},function(data){
            console.log(data);
            if(data.code==0){
                window.location.href="/tencent/fireIndex/index";
            }else{
                $.toptip('账号密码错误,请重新输入', 2000, 'error');  //设置显示时间
            }
        });
    }


</script>
</html>
